import http from './index'

export const getDeviceList = (params) => http({
  url: '/device-os/device/getDeviceList',
  method: 'GET',
  params,
})
export const getSite = (params) => http({
  url: '/device-os/area/tree',
  method: 'GET',
  params,
})
export const getParentArea = (params) => http({
  url: '/device-os/area/getParentArea',
  method: 'GET',
  params
})
export const getAreaItem = (params) => http({
  url: '/device-os/area/item',
  method: 'GET',
  params
})
export const getOpenAccess = (params) => http({
  url: '/device-os/person/getOpenAccess',
  method: 'GET',
  params
})
export const selectAreaUser = (params) => http({
  url: '/user/selectAreaUser',
  method: 'GET',
  params
})
export const updateOpenAccess = (data) => http({
  url: '/device-os/person/updateOpenAccess',
  method: 'POST',
  data
})
export const addAreaAdmin = (data) => http({
  url: '/device-os/area/addAreaAdmin',
  method: 'POST',
  data
})
export const updateArea = (data) => http({
  url: '/device-os/area/update',
  method: 'POST',
  data
})
export const addArea = (data) => http({
  url: '/device-os/area/add',
  method: 'POST',
  data
})
export const deleteOne = (data) => http({
  url: '/device-os/area/delete',
  method: 'POST',
  data
})


